// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_HR_MONTH_SALARY_ITEM
// * CreateDate    : 2014-06-05 18:30:05
// * Creater       : CodeSmith
// * LastChangeDate: 2014-06-05 18:30:05
// * LastChanger   : 2014-06-05 18:30:05
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;
using ESOL.Common;

namespace ESOL.Common.Entity
{
    [DataContract]
	[Serializable]
	public partial class HrMonthSalaryItemEntity : EntityBase
    {
        public HrMonthSalaryItemTable TableSchema
        {
            get
            {
                return HrMonthSalaryItemTable.Current;
            }
		}
		
		public HrMonthSalaryItemEntity()
        {

        }
		
		public HrMonthSalaryItemEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.ItemId = Convert.ToString(CommonFunctions.ToObject(dr["ITEM_ID"]));
			this.MonthSalaryId = Convert.ToString(CommonFunctions.ToObject(dr["MONTH_SALARY_ID"]));
			this.SalaryItem = Convert.ToString(CommonFunctions.ToObject(dr["SALARY_ITEM"]));
			this.TotalHours = Convert.ToDecimal(CommonFunctions.ToObject(dr["TOTAL_HOURS"]));
			this.HourPrice = Convert.ToDecimal(CommonFunctions.ToObject(dr["HOUR_PRICE"]));
			this.Salary = Convert.ToDecimal(CommonFunctions.ToObject(dr["SALARY"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
        }
		
		public HrMonthSalaryItemEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.ItemId = Convert.ToString(CommonFunctions.ToObject(dr["ITEM_ID"]));
			this.MonthSalaryId = Convert.ToString(CommonFunctions.ToObject(dr["MONTH_SALARY_ID"]));
			this.SalaryItem = Convert.ToString(CommonFunctions.ToObject(dr["SALARY_ITEM"]));
			this.TotalHours = Convert.ToDecimal(CommonFunctions.ToObject(dr["TOTAL_HOURS"]));
			this.HourPrice = Convert.ToDecimal(CommonFunctions.ToObject(dr["HOUR_PRICE"]));
			this.Salary = Convert.ToDecimal(CommonFunctions.ToObject(dr["SALARY"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return HrMonthSalaryItemTable.Current;
            }
        }
		
		#region Perporty List
        [DataMember]
        public string ItemId
        {
            get { return Convert.ToString(GetData(HrMonthSalaryItemTable.C_ITEM_ID)); }
            set { SetData(HrMonthSalaryItemTable.C_ITEM_ID, value); }
        }
		
        [DataMember]
        public string MonthSalaryId
        {
            get { return Convert.ToString(GetData(HrMonthSalaryItemTable.C_MONTH_SALARY_ID)); }
            set { SetData(HrMonthSalaryItemTable.C_MONTH_SALARY_ID, value); }
        }
		
        [DataMember]
        public string SalaryItem
        {
            get { return Convert.ToString(GetData(HrMonthSalaryItemTable.C_SALARY_ITEM)); }
            set { SetData(HrMonthSalaryItemTable.C_SALARY_ITEM, value); }
        }
		
        [DataMember]
        public decimal TotalHours
        {
            get { return Convert.ToDecimal(GetData(HrMonthSalaryItemTable.C_TOTAL_HOURS)); }
            set { SetData(HrMonthSalaryItemTable.C_TOTAL_HOURS, value); }
        }
		
        [DataMember]
        public decimal HourPrice
        {
            get { return Convert.ToDecimal(GetData(HrMonthSalaryItemTable.C_HOUR_PRICE)); }
            set { SetData(HrMonthSalaryItemTable.C_HOUR_PRICE, value); }
        }
		
        [DataMember]
        public decimal Salary
        {
            get { return Convert.ToDecimal(GetData(HrMonthSalaryItemTable.C_SALARY)); }
            set { SetData(HrMonthSalaryItemTable.C_SALARY, value); }
        }
		
        [DataMember]
        public string Remark
        {
            get { return Convert.ToString(GetData(HrMonthSalaryItemTable.C_REMARK)); }
            set { SetData(HrMonthSalaryItemTable.C_REMARK, value); }
        }
		
		#endregion
	}
	
	
}	

